{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a5e06463",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-2-5d0dfadc5d04>, line 6)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-2-5d0dfadc5d04>\"\u001b[1;36m, line \u001b[1;32m6\u001b[0m\n\u001b[1;33m    for i in str\u001b[0m\n\u001b[1;37m                ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "money: str=input(\"请输入金额：\")\n",
    "goods=[\"1.书 10元\", \"2.笔 6元\", \"3.笔记本 8元\"]\n",
    "buy_goods =[]\n",
    "print(goods)\n",
    "buy=input(\"请输入购买编号\")\n",
    "for i in str\n",
    "if buy = \"1\"\n",
    " i=i-10\n",
    "    buy_goods.append\\(\"书\")\n",
    "if buy = \"2\"\n",
    " i=i-6\n",
    "     buy_goods.append\\(\"笔\")\n",
    "if buy = \"3\"\n",
    " i=i-8\n",
    "     buy_goods.append\\(\"笔记本\")\n",
    "if buy = \"退出”\n",
    " print(\"谢谢惠顾，剩余:\"i,\"已买;\"buy_goods)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ac6738b9",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
